package com.xb.cloud.product.service.business.model.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.xb.cloud.product.merchant.service.client.bo.ProductSummaryBo;
import com.xb.cloud.product.service.business.model.Product;
import com.xb.cloud.product.service.business.model.ProductExample;
import com.xb.cloud.product.service.business.model.ProductExamplePaged;

public interface ProductMapper {
    long countByExample(ProductExample example);

    int deleteByExample(ProductExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Product record);

    int insertSelective(Product record);

    List<Product> selectByExample(ProductExample example);

    Product selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);
    
    String selectSpecificationByID(Long id);

	/** 
	 * 根据类目查询可发布商品 
	 * @param productExample
	 * @return
	 */
	List<ProductSummaryBo> selectPublishableProductSummaryBoListByExample(ProductExamplePaged productExample);
	
	
	/** 
	 * 根据类目查询可发布商品 计数
	 * @param productExample
	 * @return
	 */
	 long countPublishableProductSummaryBoByExample(ProductExamplePaged example);

}